import httpInstant from '../utils/http';



/**
 * @description 获取帖子是否被该用户点赞和收藏
 * @param  postId 帖子id
 * @param  userId 用户id
 * @returns
 */
export function getPostIsGoodApi(postId, userId) {
  return httpInstant.get(`/good/getPostIsGood`, {
    params: {
      postId,
      userId
    }
  });
}


export function switchGoodApi(postId, userId, isGood) {
  console.log(isGood);

  return httpInstant.put(`/good/switchGood`, {

    postId,
    userId,
    is: isGood

  });
}